using System;
using System.Collections.Generic;
using System.Text;

namespace LispInterpretor.Parsers
{
    internal class BoolParser : IParser
    {
        #region IParser Members

        public bool Is(string text, Environment environment)
        {
            return string.Compare(text, "True", true) == 0 || string.Compare(text, "False", true) == 0;
        }

        public object Evaluate(string text, Environment environment)
        {
            return bool.Parse(text);
        }

        #endregion
    }
}
